import {
  tokenKey
} from '@/config/index.js'

/**
 * 获取token
 * @returns {String} - token
 */
export function getToken() {
  return uni.getStorageSync(tokenKey)
}

/**
 * 设置token
 * @param {String} token - token
 */
export function setToken(token) {
  uni.setStorageSync(tokenKey, token)
}

/**
 * 删除token
 */
export function removeToken() {
  uni.removeStorageSync(tokenKey)
}